<template>
  <div class="edit">
    <i-aticle :articleId="articleId"></i-aticle>
  </div>
</template>

<script>
    import iAticle from 'base/Article'
    import { mapGetters } from 'vuex'
    export default {
      data() {
        return {
          articleId: ''
        }
      },
      components: { iAticle },
      created() {
        this.articleId = this.$route.params['id'] || null
        if (!this.articleId || !this.blogInfo.title) {
          this.$router.push('/article/index')
        }
      },
      computed: {
        ...mapGetters([
          'blogInfo'
        ])
      }
    }
</script>
